import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'
import AddHero from '../pages/hero/AddHero.vue'
import EditHero from '../pages/hero/EditHero.vue'

import Jn from '../pages/jn/Jn.vue'
import Zb from '../pages/zb/Zb.vue'
Vue.use(VueRouter)

const routes = [ 
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/index',
        component: Index
    },
    {
        path: '/addhero',
        component: AddHero
    },
    {
        path: '/edithero/:id',
        component: EditHero
    },
    {
        path: '/jn',
        component: Jn
    },
    {
        path: '/zb',
        component: Zb
    }
 ]

const router = new VueRouter({
    routes
})

export default router